from gxl_ai_utils.utils import utils_file

tasks_list = [
    'age',
    'gender',
    'emotion',
    'style',
    'caption'
]
output_jsonl_path = './Q_with_asr/data.jsonl'
output_dict_list = []
for task in tasks_list:
    raw_file_path = f'./Q_with_asr/{task}.json'
    dict_item = utils_file.load_dict_from_json(raw_file_path)
    for key, value in dict_item.items():
        for i in range(20):
            new_key = f'{task}_{key}_speaker_{i+1}'
            output_dict_list.append({new_key: value})

utils_file.write_dict_list_to_jsonl(output_dict_list, output_jsonl_path)

